-- GENERATED SPELL FOR [Rotting Agam'ar] --


function spell0_4512(pUnit, Event) --@Cursed Blood,Self--
pUnit:FullCastSpellOnTarget(8267,pUnit)
pUnit:RegisterEvent('Sorts_4512', 603, 1)
end

function spell1_4512(pUnit, Event) --@Cursed Blood,Self--
pUnit:FullCastSpellOnTarget(8268,pUnit)
pUnit:RegisterEvent('Sorts_4512', 560, 1)
end

function Sorts_4512(pUnit, Event)
local choix_sorts_4512 = math.random(0, 1)
if choix_sorts_4512 == 0 then
pUnit:RegisterEvent('spell0_4512', 1, 1)
end
if choix_sorts_4512 == 1 then
pUnit:RegisterEvent('spell1_4512', 1, 1)
end
end

function mob4512_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4512', math.random(1500, 3000), 1)
end

function mob4512_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4512_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4512_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4512, 1, 'mob4512_Action')
RegisterUnitEvent(4512, 2, 'mob4512_Leave')
RegisterUnitEvent(4512, 3, 'mob4512_Kill')
RegisterUnitEvent(4512, 4, 'mob4512_Die')
